package com.linkgie.galaxyframework.persistence.mongodb;

import org.springframework.data.annotation.Version;
import org.springframework.data.mongodb.core.index.Indexed;

import com.linkgie.galaxyframework.data.AuditableObject;
import com.linkgie.galaxyframework.data.VersionedObject;

/**
 * 可审计的持久化对象；
 * <p>
 * 
 * 实现了 {@link AuditableObject} 定义的审计字段；
 * 
 * @author huanghaiquan
 *
 */
public class VersionedMongoPO extends MongoPO implements VersionedObject{
	
	@Indexed
	@Version
	private long dataVersion;

	@Override
	public long getDataVersion() {
		return dataVersion;
	}

	public void setDataVersion(long dataVersion) {
		this.dataVersion = dataVersion;
	}
	
}
